#
# Makefile for http stuff
#

#include $(TOPDIR)/config.mk
#
#$(info PR_NAME = "$(PR_NAME)")
#PRODUCT:=$(if $(PR_NAME),$(PR_NAME),$(PROFILE))
#PRD_WEB_DIR = tplink
#ifeq ($(CFG_MANUFACTURER_NAME),Mercury)
#PRD_WEB_DIR = mercury
#endif
#
#ifeq ($(CFG_MANUFACTURER_NAME),Fast)
#PRD_WEB_DIR = fast
#endif
#ifeq ($(PRODUCT),)
#$(error Product name for Web not specified!)
#endif
#
#DEVICE_NAME:=$(subst @, ,$(CFG_DEVICE_NAME))
#HW_VERSION:="$(word 2,$(DEVICE_NAME))"
#DEVICE_MODEL:="$(subst ^, ,$(word 1,$(DEVICE_NAME)))"

#PRD_WEB_DIR = $(PRODUCT)
#LIB   = lib_uip.a

obj-$(CONFIG_UIP) += lib_uip.o

obj-$(CONFIG_UIP) += uip/uip.o
obj-$(CONFIG_UIP) += uip/uip_arp.o
obj-$(CONFIG_UIP) += uip/timer.o 
obj-$(CONFIG_UIP) += uip/uip-split.o 

obj-$(CONFIG_UIP) += apps/uip_apps.o
obj-$(CONFIG_UIP) += apps/httpd/httpd.o
obj-$(CONFIG_UIP) += apps/httpd/fs.o
obj-$(CONFIG_UIP) += apps/dhcpd/dhcpd.o
obj-$(CONFIG_UIP) += apps/upgrade/http_upgrade.o

ccflags-$(CONFIG_UIP) += -I$(srctree)/lib/lib_uip
ccflags-$(CONFIG_UIP) += -I$(srctree)/lib/lib_uip/uip
ccflags-$(CONFIG_UIP) += -I$(srctree)/lib/lib_uip/apps
ccflags-$(CONFIG_UIP) += -I$(srctree)/lib/lib_uip/apps/httpd
ccflags-$(CONFIG_UIP) += -I$(srctree)/lib/lib_uip/apps/dhcpd
ccflags-$(CONFIG_UIP) += -I$(srctree)/lib/lib_uip/apps/upgrade
ccflags-$(CONFIG_UIP) += -I$(srctree)/lib/lib_verify
ccflags-$(CONFIG_UIP) += -I$(srctree)/lib/dual_image
ccflags-$(CONFIG_UIP) += -I$(srctree)/lib/flash_layout

FORCE:
	cd $(srctree)/lib/lib_uip/apps/httpd/webs/; eval ./makefsdatac ${CONFIG_PR_NAME};

#all:    $(LIB)

#apps/httpd/fs.c:   fsdata.c
#	echo --fsdata.c generated by HouXB--

#fsdata.c:
	#cd $(TOPDIR)/lib_uip/apps/httpd/webs/; ./makefsdatac $(PRD_WEB_DIR) ${DEVICE_MODEL} ${HW_VERSION} ${FLASH_SIZE}

#$(LIB): $(START) $(OBJS)
#	@echo 'Recovery web version: $(PRODUCT)'
#	$(AR) crv $@ $(OBJS)

##########################################################################

#.depend: Makefile $(OBJS:.o=.c)
#	     $(CC) -M $(cpp_flags) $(OBJS:.o=.c) > $@

#sinclude .depend

##########################################################################

